package ${packageName}.service;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.IService;
import com.layer.cms.common.result.ResponseData;

import ${packageName}.pojo.${className};
import ${packageName}.dto.${className}Dto;
import ${packageName}.vo.${className}Vo;

/**
* ${remark}
* @author: ${operationSupport}
* @date: ${.now?string["yyyy-MM-dd HH:mm:ss"]}
*/
public interface ${className}Service extends IService<${className}> {

  	/**
	 * @description: 分页条件查询
	 * @author: ${operationSupport}
	 * @data: ${.now?string["yyyy-MM-dd HH:mm:ss"]}
	 * @param dto
	 * @return ResponseData
	 */
	ResponseData<List<${className}Vo>> list(${className}Dto dto);
	
	/**
	 * @description: 根据ID查询详情
	 * @author: ${operationSupport}
	 * @data: ${.now?string["yyyy-MM-dd HH:mm:ss"]}
	 * @param id ID
	 * @return
	 */
	ResponseData<${className}Vo> queryById(String id);
	
  	/**
	 * @description: 添加或者修改; ID为空添加
	 * @author: ${operationSupport}
	 * @data: ${.now?string["yyyy-MM-dd HH:mm:ss"]}
	 * @param bean
	 * @return true: 数据修改成功; false: 数据修改失败
	 */
	ResponseData<String> insertOrUpdate(${className}Dto bean);

  	/**
	 * @description: 根据ID删除数据 - 物理删除
	 * @author: ${operationSupport}
	 * @data: ${.now?string["yyyy-MM-dd HH:mm:ss"]}
	 * @param id		操作ID
	 * @return 删除数据的条数
	 */
	ResponseData<String> delete(String id);


  	/**
	 * @description: 禁用或者启用
	 * @author: ${operationSupport}
	 * @data: ${.now?string["yyyy-MM-dd HH:mm:ss"]}
	 * @param id		操作ID
	 * @param state	状态; 0: 禁用; 1: 启用
	 * @return 数据修改条数
	 */
	ResponseData<String> state(String id, boolean state);
	
	
	/**
	 * @description: 批量删除数据
	 * @author: ${operationSupport}
	 * @data: ${.now?string["yyyy-MM-dd HH:mm:ss"]}
	 * @param list
	 * @return 删除条数
	 */
	ResponseData<String> batchDelete(List<${className}Dto> list);


	/**
	 * @description: 批量启用
	 * @author: ${operationSupport}
	 * @data: ${.now?string["yyyy-MM-dd HH:mm:ss"]}
	 * @param list
	 * @return 启用条数
	 */
	ResponseData<String> online(List<${className}Dto> list);


	/**
	 * @description: 批量禁用
	 * @author: ${operationSupport}
	 * @data: ${.now?string["yyyy-MM-dd HH:mm:ss"]}
	 * @param list
	 * @return 禁用条数
	 */
	ResponseData<String> offline(List<${className}Dto> list);
	
	/**
	 * @description: 清空表所有数据
	 * @author: ${operationSupport}
	 * @data: ${.now?string["yyyy-MM-dd HH:mm:ss"]}
	 */
	ResponseData<String> deleteAll();

	/**
	* @description: 获取所有id
	* @author: ${operationSupport}
	* @data: ${.now?string["yyyy-MM-dd HH:mm:ss"]}
	*/
	ResponseData<List<String>> queryIds();
}
